﻿/* ============================================================================== 
 * 功能描述：BT00001 
 * 创 建 者：Administrator
 * 创建日期：2016/4/30 14:46:29 
 * ==============================================================================*/

using System;
using System.Collections.Generic;
using UnityEngine;

namespace ZZQFrameWork.AI.BT
{
    /// <summary>
    /// 角色行为树
    /// </summary>
    public class BT00001:BehaviorTreeRoot
    {
        private static BT00001 _instance;

        public static BT00001 Instance
        {
            get
            {
                if(_instance==null)_instance=new BT00001();
                return _instance;
            }
        }

        private BT00001()
        {
            SelectorNode node1 = new SelectorNode();
            AddChild(node1);
            SequenceNode node2 = new SequenceNode();
            node1.AddChild(node2);
            Not node23 = new Not();
            node2.AddChild(node23);
            IsHasTarget node3 = new IsHasTarget();
            node23.Proxy(node3);
            IdleSpace node4 = new IdleSpace();
            node2.AddChild(node4);

            SequenceNode node5 = new SequenceNode();
            node1.AddChild(node5);
            IsTargetMonster node6 = new IsTargetMonster();
            node5.AddChild(node6);
            IsNearTarget node7 = new IsNearTarget();
            node5.AddChild(node7);
            SelectorNode node8 = new SelectorNode();
            node5.AddChild(node8);
            SequenceNode node9 = new SequenceNode();
            node8.AddChild(node9);
            Not node24 = new Not();
            node9.AddChild(node24);
            IsFreedSkil node21 = new IsFreedSkil();
            node24.Proxy(node21);
            IsHasNeedFreedSkill node10 = new IsHasNeedFreedSkill();
            node9.AddChild(node10);
            Not node25 = new Not();
            node9.AddChild(node25);
            IsSkillInCold node11 = new IsSkillInCold();
            node25.Proxy(node11);
            FreedSkill node12 = new FreedSkill();
            node9.AddChild(node12);
            SequenceNode node13 = new SequenceNode();
            node8.AddChild(node13);
            Not node26 = new Not();
            node13.AddChild(node26);
            IsInAttackCold node22 = new IsInAttackCold();
            node26.Proxy(node22);
            AttackTo node15 = new AttackTo();
            node13.AddChild(node15);

            SelectorNode node16 = new SelectorNode();
            node1.AddChild(node16);
            SequenceNode node17 = new SequenceNode();
            node16.AddChild(node17);
            Not node27 = new Not();
            node17.AddChild(node27);
            IsInMove node18 = new IsInMove();
            node27.Proxy(node18);
            IsFindPath node19 = new IsFindPath();
            node17.AddChild(node19);
            MoveTo node20 = new MoveTo();
            node17.AddChild(node20);
            IsCanNotMove node30 = new IsCanNotMove();
            node16.AddChild(node30);
        }
    }

}
